Customizing media items for  playback on alternative playback devices paired with a user device

ABSTRACT

A user device receives a first media item that is associated with a second media item. The device determines that a playback state for the device indicates that the device is paired with an alternative playback device. The device sends the playback state in a request for the second media item, receives the second media item in a first format for playback on the user device and in a second format for playback on the alternative playback device. The device determines whether the playback state of the device is the same. The device displays a first graphical representation of the second media item in the first format on the user device if the user device is no longer paired with the alternative playback device and displays a second graphical representation of the second media item in the second format on the user device if the user device is still paired with the alternative playback device.

TECHNICAL FIELD

The present disclosure relates to a technique for providing content,such as media from a source of such content to a user device or systemvia a communication network. More particularly, the present disclosurerelates to a technique for ensuring that content provided for a user ofa user device is compatible with playback on an alternative playbackdevice if the user device is paired with the alternative playbackdevice.

BACKGROUND

Existing systems for provisioning media content (e.g., videos, music)from a server to one or more user devices generally use a protocol forstreaming such content from the server to a playback means (i.e., avideo and/or audio player) on the user device, as long as such player iscapable of receiving such content for display on the device. On typicaluser devices, applications or players may be available to receive anduse/play such content. The user device may be in proximity to anexternal media streaming device that streams content for presentation onoutput devices, such as a television and/or a home theater audio system.The user device can display various media content (e.g., videos, music)to a user, and the user may select media content for playback on eitherthe user device or an output device of the media streaming device. Inexisting systems, the server typically transmits media content (e.g.,videos, music) to the user device for playback on the user device. Theuser device may have a smaller display and a basic speaker system ascompared to the output devices (e.g., television and/or a home theateraudio system) that are connected to a media streaming device. Inexisting systems, the media content which the server provides to theuser device is generally not customized for the hardware of the outputdevices of the media streaming device. This is because existingtechniques rely on the settings of the user device with no means todetermine whether the user device is capable of initiating and/orcontrolling playback of the media content on output devices of a mediastreaming device.

Traditionally, when a user device loads a web page that has aplaceholder for additional media content (e.g., a recommended video oran advertisement), the user device usually sends a request to a serverfor the additional media content. The server receives the request,selects the additional media content, and sends the additional mediacontent to the user device. The server is typically unaware of whetherthe user device is capable of initiating and/or controlling playback ofthe additional media content on output devices of a media streamingdevice. The user device loads the additional media content in the webpage. With conventional content sharing systems, after the additionalmedia content is loaded, the user device then determines whether theuser device can communicate with a media streaming device. If the userdevice can communicate with a media streaming device, a media player onthe user device can display an indicator (e.g., icon) to notify the userthat the additional media content item can be played on an output deviceof the media streaming device.

In existing systems, the server typically provides additional mediacontent pertaining to the user request without knowledge of the userdevice's capability to initiate and/or control playback of theadditional media content on a media streaming device. As such, theserver usually provides additional media content that is formatted forplayback on the user device, which may not be the best format to use ifthe additional media content can be played on an output device of amedia streaming device such as a television and/or a home theater soundsystem.

Conversely, the server can provide the user device with additional mediacontent that is formatted for playback on an output device of a mediastreaming device such as a television and/or a home theater soundsystem. However, if the user device cannot communicate with the mediastreaming device, a large amount of broadband data bandwidth and memorymay be used for transmitting and playing the additional media content ina format not compatible with the user device.

Further, in existing systems, when additional media content is loaded ona user device and then played on an output device of a media streamingdevice, content sharing systems typically assign two different sessionsfor loading the additional media content on the user device and playingthe additional media content on the output device of the media streamingdevice. Conventional content sharing systems generally do not attributethe time the additional media content is played on the output device ofthe media streaming device with the presentation of the additional mediacontent on the user device, and mistakenly track the displaying of theadditional media content on the user device and playing of theadditional media content on the output device of the media streamingdevice independently.

SUMMARY

The following presents a simplified summary of various aspects of thisdisclosure in order to provide a basic understanding of such aspects.This summary is not an extensive overview of all contemplated aspects,and is intended to neither identify key or critical elements nordelineate the scope of such aspects. Its purpose is to present someconcepts of this disclosure in a simplified form as a prelude to themore detailed description that is presented later.

In an aspect of the present disclosure, a processing device of a userdevice receives a first media item from a server. The first media itemis associated with a second media item. The processing device determinesthat a playback state for the user device indicates that the user deviceis paired with an alternative playback device, sends a request to theserver for the second media item. The request includes the playbackstate for the user device. The processing device receives, from theserver, the second media item in a first format for playing the secondmedia item on the user device and receives the second media item in asecond format for playing the second media item on the alternativeplayback device. The processing device determines whether the playbackstate of the user device no longer indicates that the user device ispaired with the alternative playback device.

Responsive to determining that the playback state of the user device nolonger indicates that the user device is paired with the alternativeplayback device, the processing device displays a first graphicalrepresentation of the second media item in the first format on the userdevice. User selection of the first graphical representation triggersplayback of the second media item on the user device. Responsive todetermining that the playback state of the user device indicates thatthe user device is paired with the alternative playback device, theprocessing device displays a second graphical representation of thesecond media item in the second format on the user device. Userselection of the second graphical representation triggers playback ofthe second media item on the alternative playback device.

In one implementation, the playback state is stored locally on the userdevice. In one implementation, the alternative playback device supportsat least one of casting technology or mirroring technology. In oneimplementation, the processing device displays the second graphicalrepresentation of the second media item in the second format on the userdevice, receives user selection of the second graphical representation,and sends a universal resource identifier of the second media item and atracking identifier associated with a session identifier of the requestto the alternative playback device.

In one implementation, the second graphical representation of the secondmedia item in the second format includes a thumbnail, a stringplaceholder for an identifier of the alternative playback device, and auniversal resource identifier for playing the selected candidate mediaitem on the alternative playback device. In one implementation, theprocessing device displays the second graphical representation of thesecond media item in the second format on the user device by determiningan identifier of the alternative playback device, and displaying theidentifier of the alternative playback device in the second graphicalrepresentation of the second media item. In one implementation, thesecond media item is at least one of recommended video, recommendedaudio, or an advertisement.

In one implementation, the processing device of a server receives arequest from a user device for an additional media item pertaining to afirst media item to be displayed on the user device, determines, from aplayback state for the user device in the request, whether theadditional media item is to be played on an alternative playback device.Responsive to a determination that the additional media item is to beplayed on the alternative playback device, the processing device of theserver identifies a set of candidate media items that are designated forplayback on the alternative playback device, selects a candidate mediaitem with a highest ranking from the set of candidate media items as theadditional media item, and sends a data package to the user device forpresenting the selected candidate media item as the additional mediaitem on the user device.

In one implementation, the processing device of the server determinesthat the playback state indicates that the additional media item is notto be played on the alternative playback device, and excludes the subsetof media items that are designated for playback on the alternativeplayback device from the set of candidate media items. In oneimplementation, the data package includes a first format for playing theselected candidate media item on the user device, and a second formatfor playing the selected candidate media item on the alternativeplayback device. In one implementation, the processing device of theserver determines that the playback state indicates that the additionalmedia item is not to be played on the alternative playback device,creates a tracking identifier based on a session identifier that isassociated with the request, adds the tracking identifier to a universalresource identifier for playing the selected candidate media item on thealternative playback device, and creates the data package including theuniversal resource identifier with the tracking identifier.

In one implementation, the processing device of the server receivesoutput device data describing one or more features of one or more outputdevices connected to the alternative playback device, and selects one ormore universal resource identifiers based on the one or more features ofone or more output devices connected to the alternative playback device.

An apparatus to customize media items for playback on alternativeplayback devices paired with a user device is also described. In oneimplementation, the apparatus includes means for receiving a first mediaitem from a server. The first media item is associated with a secondmedia item. The apparatus includes means for determining that a playbackstate for the user device indicates that the user device is paired withan alternative playback device, means for sending a request to theserver for the second media item. The request includes the playbackstate for the user device. The apparatus includes means for receiving,from the server, the second media item in a first format for playing thesecond media item on the user device and means for receiving the secondmedia item in a second format for playing the second media item on thealternative playback device. The apparatus includes means fordetermining whether the playback state of the user device no longerindicates that the user device is paired with the alternative playbackdevice.

The apparatus includes means for displaying a first graphicalrepresentation of the second media item in the first format on the userdevice responsive to determining that the playback state of the userdevice no longer indicates that the user device is paired with thealternative playback device. User selection of the first graphicalrepresentation triggers playback of the second media item on the userdevice. The apparatus includes means for displaying a second graphicalrepresentation of the second media item in the second format on the userdevice responsive to determining that the playback state of the userdevice indicates that the user device is paired with the alternativeplayback device. User selection of the second graphical representationtriggers playback of the second media item on the alternative playbackdevice.

In one implementation, the playback state is stored locally on the userdevice. In one implementation, the alternative playback device supportsat least one of casting technology or mirroring technology. In oneimplementation, the apparatus includes means for displaying the secondgraphical representation of the second media item in the second formaton the user device, means for receiving user selection of the secondgraphical representation, and means for sending a universal resourceidentifier of the second media item and a tracking identifier associatedwith a session identifier of the request to the alternative playbackdevice.

In one implementation, the second graphical representation of the secondmedia item in the second format includes a thumbnail, a stringplaceholder for an identifier of the alternative playback device, and auniversal resource identifier for playing the selected candidate mediaitem on the alternative playback device. In one implementation, theapparatus includes means for displaying the second graphicalrepresentation of the second media item in the second format on the userdevice by means for determining an identifier of the alternativeplayback device, and means for displaying the identifier of thealternative playback device in the second graphical representation ofthe second media item. In one implementation, the second media item isat least one of recommended video, recommended audio, or anadvertisement.

In one implementation, the apparatus includes means for receiving arequest from a user device for an additional media item pertaining to afirst media item to be displayed on the user device, means fordetermining, from a playback state for the user device in the request,whether the additional media item is to be played on an alternativeplayback device. The apparatus includes means for identifying a set ofcandidate media items that are designated for playback on thealternative playback device responsive to a determination that theadditional media item is to be played on the alternative playbackdevice. The apparatus includes means for selecting a candidate mediaitem with a highest ranking from the set of candidate media items as theadditional media item, and means for sending a data package to the userdevice for presenting the selected candidate media item as theadditional media item on the user device.

In one implementation, the apparatus includes means for determining thatthe playback state indicates that the additional media item is not to beplayed on the alternative playback device, and means for excluding thesubset of media items that are designated for playback on thealternative playback device from the set of candidate media items. Inone implementation, the data package includes a first format for playingthe selected candidate media item on the user device, and a secondformat for playing the selected candidate media item on the alternativeplayback device. In one implementation, the apparatus includes means fordetermining that the playback state indicates that the additional mediaitem is not to be played on the alternative playback device, means forcreating a tracking identifier based on a session identifier that isassociated with the request, means for adding the tracking identifier toa universal resource identifier for playing the selected candidate mediaitem on the alternative playback device, and means for creating the datapackage including the universal resource identifier with the trackingidentifier.

In one implementation, the apparatus includes means for receiving outputdevice data describing one or more features of one or more outputdevices connected to the alternative playback device, and means forselecting one or more universal resource identifiers based on the one ormore features of one or more output devices connected to the alternativeplayback device.

In additional implementations, computing devices for performing theoperations of the above described implementations are also implemented.Additionally, in implementations of the disclosure, a computer readablestorage media may store instructions for performing the operations ofthe implementations described herein.

BRIEF DESCRIPTION OF THE DRAWINGS

Aspects and implementations of the present disclosure will be understoodmore fully from the detailed description given below and from theaccompanying drawings of various aspects and implementations of thedisclosure, which, however, should not be taken to limit the disclosureto the specific aspects or implementations, but are for explanation andunderstanding only.

FIG. 1 illustrates an example of system architecture for customizing amedia item based on a capability of a user device to control playback ofthe media item on an alternative playback device, in accordance with oneimplementation of the disclosure.

FIG. 2 is an example graphical user interface (GUI) displaying agraphical representation of a media item in a format for playing themedia item on a user device, in accordance with an implementation of thedisclosure.

FIG. 3 is an example GUI displaying a graphical representation of amedia item on a user device for playing the media item on an alternativeplayback device, in accordance with an implementation of the disclosure.

FIG. 4 depicts a flow diagram of a method for providing a custom mediaitem depending on whether a user device is paired with an alternativeplayback device, in accordance with one implementation of the presentdisclosure.

FIG. 5 depicts a flow diagram of a method for selecting a media itembased on whether a user device is paired with an alternative playbackdevice, in accordance with one implementation of the present disclosure.

FIG. 6 depicts a block diagram of an example computing device operatingin accordance with one or more aspects of the present disclosure.

DETAILED DESCRIPTION

Aspects and implementations of the present disclosure provide amechanism for ensuring that media items are in an appropriate format forplayback on hardware of a user device or on hardware associated withalternative playback devices that the user device is paired with. Analternative playback device is a media streaming device that can receiveinstructions from a user device to play a media item on a display thatis separate from the user device. Media items can be, for example, webpage content, mobile application (“app”) content, digital images,digital audio, and/or digital video. The media items can be primarymedia items and secondary media items. A primary media item can be, forexample, web page content and mobile app content. A secondary media itemcan be, for example, a recommended video, recommended audio, or anadvertisement. A secondary media item is hereinafter also referred to asan additional media item. A primary media item can be associated withone or more secondary media items. For example, the primary media itemmay be mobile app content and the secondary media item may be arecommended video or an advertisement to be displayed in relation to themobile app content.

As discussed above, conventional systems are typically unaware ofwhether a user device is paired with an alternative playback device(e.g., a second screen device in the user's living room) and do notprovide content customized for playback on the alternative playbackdevice when it is paired with the user device.

Aspects of the present disclosure address the above and otherdeficiencies by providing a mechanism for ensuring that an additionalmedia item compatible with playback on an alternative playback device isprovided if the user device is paired with the alternative playbackdevice. The user device is considered to be paired with the alternativeplayback device if the user device can communicate with the alternativeplayback device and can initiate and/or control playback of content onthe alternative playback device.

According to some aspects of the present disclosure, prior to the userdevice sending a request to the server for the additional media item,the user device determines a playback state of the user device thatindicates whether the user device is paired with the alternativeplayback device. The user device sends its playback state to the serverto notify the server of the user device's capability of having theadditional media item be played on the alternative playback device. Theserver receives the playback state and can customize the selection ofthe additional media item based on the user device's playback state. Theserver can provide a content package that includes the selectedadditional media item in a format for playing the additional media itemon the user device and in another format for playing the additionalmedia item on the alternative playback device. The user device receivesthe content package, determines if the playback state has changed, anddisplays the additional media item in the appropriate format on the userdevice based on whether the playback state has changed.

Accordingly, aspects and implementations of the present disclosureensure that the server provides the user device with additional mediaitems that are customized for playback on the alternative playbackdevice and the user device if the user device is paired with thealternative playback device. Aspects of the present disclosure alsoprovide a tracking identifier to link the display of the additionalmedia item on the user device to the playback of the additional mediaitem on the alternative playback device.

The technology disclosed herein is advantageous because it avoidsoverburdening broadband networks with transmissions of large media filesfrom a server to a user device if the user device is not paired with analternative playback device. Instead, such media files are onlytransmitted if the user device is paired with an alternative playbackdevice. In addition, by customizing additional media items for playbackon an alternative playback device such as a large television screen(e.g., in a user's living room), the technology disclosed herein enablesthe user to have a more immersive and interactive viewing experience,and to share this experience with the user's friends and family.

Implementations of the present disclosure often reference videos forsimplicity and brevity. However, the teaching of the present disclosureare applied to media items generally and can be applied to various typesof content, including for example, video, audio, text, images, programinstructions, etc.

FIG. 1 illustrates an example of system architecture 100, in accordancewith one implementation of the present disclosure. The systemarchitecture 100 includes one or more user devices (e.g., user device140), one or more servers (e.g., primary content provider server 160,secondary content provider server 160), one or more alternative playbackdevices 101A,B, one or more output devices 103A,B, networks (e.g.,network 115, network 150), and one or more data stores (e.g., data store163,123,143).

The content provider servers 120,160 can be coupled to one or more datastores 123,163 that store media items. The primary content providerserver 160 can be a web service provider, a digital video provider, amusic provider, a social media provider, etc. The secondary contentprovider server 120 can be, for example, an advertisement server or arecommendation server. The media items can be primary media items 161and secondary media items 129A,B (additional media items). For brevityand simplicity, one primary media item 162 and one secondary media item(e.g., secondary media item 129A, secondary media item 129B) (additionalmedia item) may be used as examples throughout this document. Theprimary media items 161 and secondary media items 129A,B may be digitalcontent chosen by a user, digital content made available by a user,digital content uploaded by a user, digital content chosen by a contentprovider, digital content chosen by a broadcaster, etc. Examples ofprimary media items 161 and secondary media items 129A,B include, andare not limited to, web page content, mobile app content, digital video,digital movies, digital photos, digital music, website content, socialmedia updates, electronic books (ebooks), electronic magazines, digitalnewspapers, digital audio books, electronic journals, web blogs, realsimple syndication (RSS) feeds, electronic comic books, softwareapplications, etc.

The servers 120,160 may be one or more computing devices (such as arackmount server, a router computer, a server computer, a personalcomputer, a mainframe computer, a laptop computer, a tablet computer, adesktop computer, etc.), data stores (e.g., hard disks, memories,databases), networks, software components, and/or hardware componentsthat may be used to provide a user with access to primary media items161 and secondary media items 129A,B and/or provide the primary mediaitems 161 and secondary media items 129A,B. The servers 120,160 may be apart of a content sharing platform that may allow users to consume,upload, share, search for, approve of (“like”), dislike, and/or commenton primary media items 161 and secondary media items 129A,B. The contentsharing platform may also include a website (e.g., a web page) orapplication (e.g., mobile application) back-end software that may beused to provide a user with access to the primary media items 161 andsecondary media items 129A,B.

For brevity and simplicity, an online video (also hereinafter referredto as a video) may be used as an example of a secondary media item129A,B throughout this document. As used herein, “media,” “media item,”“online media item,” “digital media,” “digital media item,” “content,”and “content item” can include an electronic file that can be executedor loaded using software, firmware or hardware configured to present thedigital media item to an entity.

In one example, a primary media item 161 may be a video identified by auser of user device 140 and a secondary media item 129A,B may be a videoadvertisement or a recommended video selected by the secondary contentprovider server 120 to be presented before, during or after presentingthe primary media item 161 on one or more of the user devices (e.g.,user device 140). User devices (e.g., user device 140) may each includecomputing devices such as personal computers (PCs), laptops, mobilephones, smart phones, tablet computers, netbook computers,network-connected televisions, etc. In some implementations, a userdevice 140 may also be referred to as a “client device.”

The user device 140 can include one or more applications (e.g.,application 148) for playing the primary media items 161 and thesecondary media items 129A,B. The user device 140 can be a mobiledevice, such as a smart phone, tablet, electronic reader, etc. Theapplications can be a web browser, a web application, and native mobileapplications (mobile app). A web application or web app is aclient-server software application that uses a web browser. The webbrowser renders web pages (“pages”) provided by a server to present userinterfaces on the user device 140. A native mobile app is an applicationfor a mobile device that is for a particular operating system (e.g.,IOS®, Android®) of the mobile device. The mobile application can providedifferent screen visualizations that are referred to herein as pages.Each page can be represented by a user interface (UI). The mobileapplication can include a home page UI that can be presented when a useropens the mobile application on the user device 140. A UI of theapplication 148 (a mobile app, a web browser or a web app) can includenavigation, command, and content UI elements. The UI elements can changefrom page to page. The application 148 can include a media player (e.g.,video player, music player, audio player) for playing a media item onthe user device 140. A media player can be embedded in a web pageprovided to a web browser or in a UI of a mobile app.

The system architecture 100 can include one or more alternative playbackdevices 101A,B that are coupled to one or more output devices 103A,B.The output devices 103A,B can be displays (e.g., televisions, monitors),audio systems (e.g., high-definition television or home audio system),computer systems (e.g., desktops, laptops, tablets) and virtual reality(VR) systems (e.g., VR headset). Each alternative playback device can beconnected to multiple output devices. For example, alternative playbackdevice 101A can be connected to a large screen 3D television and a homesurround sound system. An alternative playback device 101A,B can be adigital media player that plays primary media items 161 and secondarymedia items 129A,B (e.g., audio/video, images) on one or more outputdevices (e.g., high-definition television or home audio system) bydirectly streaming the primary media items 161 and secondary media items129A,B via Wi-Fi (wireless fidelity) from the Internet or a localnetwork (e.g., network 115).

A subset of the secondary media items (e.g., secondary media items 129A)in the data store 123 may be compatible for playback using the computinghardware (e.g., display, speaker) of the user device 140. For example,secondary media items 129A may be formatted for a small display on asmartphone, may have lower video quality (e.g., 240 p and 360 p), andmay be in stereo sound.

Another subset of the secondary media items (e.g., secondary media items129B) in the data store 123 can be designated for playback onalternative playback devices 101A,B based on user (e.g., contentprovider) input. The content providers can be content owners (e.g.,video providers, music providers, advertisers) and can designate whichsecondary media items (e.g., secondary media items 129B) are forplayback on alternative playback devices 101A,B. Each of the designatedsecondary media items 129B can include an indicator 122 (e.g., bit,flag) to indicate that the respective secondary media item 129B is forplayback on alternative playback devices 101A,B, as described in greaterdetail below in conjunction with FIG. 4.

The subset of secondary media items 129B can be specifically formattedfor playback on output devices 103A,B that are coupled to thealternative playback devices 101A,B. For example, the subset ofsecondary media items 129B can be formatted for a display (e.g.,television display, projector screen, computer display) that is largerthan the display of the user device 140. In another example, secondarymedia items 129B may be formatted in high definition (HD) video quality,and may be in a surround sound (e.g., Dolby Digital® surround sound,DTS-HD® surround sound) format. In yet another example, the subset ofsecondary media items 129B may be formatted in a 3D format for outputto, for example, a 3D television display or a VR headset. In stillanother example, the subset of secondary media items 129B may be longerin length, and/or may have type of content (e.g., action movie trailercontent) specifically intended for playback on alternative playbackdevices 101. The format of the subset of secondary media items 129B,which are designated for playback on alternative playback devices101A,B, may not be supported by the user device 140. For example, asecondary media item 129B may be a 3D video, which may not be supportedby the user device 140.

The user device 140 can be coupled to one or more alternative playbackdevices 101A,B via, for example, network 115 for playing the secondarymedia items 129A,B on the alternative playback devices 101A,B. Thealternative playback devices 101A,B and the user device 140 can includewireless technology for establishing a connection between thealternative playback devices 101A,B and the user device 140. Thewireless communication technology can include peer-to-peer (P2P),Bluetooth®, Whisper®, Wi-Fi® (wireless fidelity), Wi-Fi Direct (Wi-FiP2P), infrared, ultrasonic or other technology.

The secondary media items 129B can be played on the alternative playbackdevices 101A,B using casting technology and/or mirroring technology. Theuser device 140 can include an alternative playback applicationprogramming interface (API) 147 for each alternative playback device101A,B that the user device 140 can connect to. Casting technology andmirroring technology refers to content streaming and playback thatinvolves a first device identifying content (e.g., secondary media item129B) to be played and a second device providing the playback of theidentified content. In casting technology, video encoding of thesecondary media item 129B is not performed by the user device 140. Theuser device 140 can send a universe resource identifier (URI) (e.g.,universe resource locator (URL)) for the secondary media item 129B to analternative playback device (e.g., alternative playback device 101A),and the alternative playback device 101 can use the URI to obtain thesecondary media item 129B from the secondary content provider server 120via an Internet connection over network 150. The alternative playbackdevice 101A receives the secondary media item 129B and streams thesecondary media item 129B from the URI directly to one or more outputdevices 103A (e.g., television, home theater audio system).

In mirroring technology, the user device 140 receives the secondarymedia item 129B (e.g., video) stream over the Internet and network 150,and repackages the stream as a re-formatted secondary media item 129Bstream (e.g., re-formatted video stream) for an alternative playbackdevice 101A. The user device 140 streams the re-formatted stream via aWi-Fi® router of network 115 to the alternative playback device 101A.The alternative playback device 101A outputs the secondary media item129B to an output device 101A (e.g., television, home theater audiosystem).

An application 148 on the user device 140 can load a document 142 (e.g.,web page, mobile application UI document) that may include a primarymedia item (e.g., web page content, mobile app content), and a portion(referred to as a media item placeholder 146) to be populated with agraphical representation for the secondary media item (e.g., secondarymedia item 129A or secondary media item 129B). The document 142 caninclude multiple media item placeholders. The placeholder 146 can beassociated with code (e.g., JavaScript or an iFrame®) to receive asecondary media item and render the received secondary media item or agraphical representation for the received secondary media item in theplaceholder 146 in the document 142. The secondary media item (e.g.,secondary media item 129A or secondary media item 129B) for theplaceholder 146 can be selected by a secondary content provider server120. The placeholder 146 can be for a particular type of secondary mediaitem (e.g., video ad, display ad, recommended video, etc.), and caninclude a tag that indicates to a server (e.g., secondary contentprovider server 120) what type of secondary media item should be usedfor the placeholder 146.

The user device 140 can include a custom playback component 145 to senda request 131 to a secondary content provider server 120 for a secondarymedia item (e.g., secondary media 129A or secondary media 129B)depending on whether the user device 140 is paired with alternativeplayback devices 101A,B. Prior to sending the request 131 to thesecondary content provider server 125, the custom playback component 145can determine a playback state 141 of the user device 140, whichindicates whether the user device 140 is paired with (e.g., capable ofinitiating/controlling playback of a secondary media item (e.g.,advertisement, recommended video, recommended audio) on) alternativeplayback devices 101A,B. The playback state 141 can be an indication ofwhether the user device 140 includes an alternative playback applicationprogramming interface (API) 147, includes the proper operating systempermissions to allow the application 148 to initiate playback of asecondary media item on an alternative playback device (e.g.,alternative playback device 101A), and whether the user device 140 cancommunicate with the alternative playback device 101A, as described ingreater detail below in conjunction with FIG. 4.

The playback state 141 may already be stored in a data store 143 of theuser device 140. The data store 143 can be a cache in which a playbackstate 141 was stored when it was most recently determined by the customplayback component 145, as described in greater detail below inconjunction with FIG. 4. For example, the cache can store the playbackstate 141 that was determined when the application 148 last loaded adocument 142. The playback state 141 can be stored as part ofapplication data of a mobile application or as a cookie of a webbrowser. If there is not already a playback state 141 stored in the datastore 143, the custom playback component 145 can determine the playbackstate 141 for the user device 140, as described in greater detail belowin conjunction with FIG. 4.

In one implementation, the custom playback component 145 sends a request131, which includes the playback state 141, for a secondary media itemto a primary content provider server 160, and the primary contentprovider server 160 requests the secondary media item from the secondarycontent provider server 120. In another implementation, the customplayback component 145 sends a request 131, with the playback state 141,for a secondary media item directly to the secondary content providerserver 120.

An alternative media playback provider 125 on the secondary contentprovider server 120 can receive the request 131 for a secondary mediaitem and can select a secondary media item (e.g., secondary media item129A or secondary media item 129B) based on the playback state 141 ofthe user device 140 in the request 131. The alternative media playbackprovider 125 can use the playback state 141 to either include or excludethe subset of secondary media items 129B, which are formatted forplayback on alternative playback devices 101A,B, in the selectionprocess, as described in greater detail below in conjunction with FIG.5. The alternative media playback provider 125 can also use the playbackstate 141 to rank the secondary media items 129A,B based on the playbackstate 141, as described in greater detail below in conjunction with FIG.5.

If the playback state 141 in the request 131 indicates that the userdevice 140 is paired with alternative playback devices 101A,B, thealternative media playback provider 125 can select a secondary mediaitem in the subset of secondary media items 129B that are formatted foralternative playback devices 101A,B, as described in greater detailbelow in conjunction with FIG. 5. If the playback state 141 indicatesthat the user device 140 is not paired with alternative playback devices101A,B, the alternative media playback provider 125 can select asecondary media item in the subset of secondary media items 129A thatare not formatted for playback on alternative playback devices 101A,B.

The alternative media playback provider 125 can create a data package133 that includes the selected secondary media item (e.g., secondarymedia item 129A or secondary media item 129B). In one implementation,the alternative media playback provider 125 sends the data package 133to the primary content provider server 160, and the primary contentprovider server 160 sends the data package 133 to user device 140. Inanother implementation, the alternative media playback provider 125directly sends the data package 133 to the user device 140.

If the alternative media playback provider 125 selects one of the subsetof secondary media items 129B, which are formatted for playback onalternative playback devices 101A,B, the alternative media playbackprovider 125 can provide the selected secondary media item 129B inmultiple formats. The data package 133 can include the selectedsecondary media item 129B in a first format for playing the selectedsecondary media item 129B on the user device 140 and can include theselected secondary media item 129B in a second format for playing theselected secondary media item 129B on an alternative playback device101A.

When the user device 140 receives the data package 133, the user device140 may no longer be connected to any alternative playback device, andmay no longer have the capability for controlling playback of theselected secondary media item 129B on an alternative playback device.The custom playback component 145 on the user device 140 can selecteither the first format or the second format in the data package 133based on whether or not the user device 140 is still paired with (e.g.,has the capability of controlling the playback of the selected secondarymedia item 129B) on an alternative playback device. The custom playbackcomponent 145 on the user device 140 can determine a new playback state149 to determine whether the user device 140 is still capable ofcontrolling the playback of the selected secondary media item 129 on analternative playback device, as described in greater detail below inconjunction with FIG. 4.

If the user device 140 does not have the capability to initiate/controlthe playback of the selected secondary media item 129 on an alternativeplayback device, the custom playback component 145 can select the firstformat. The first format of the selected secondary media item 129B forplaying the secondary media item 129B on the user device 140 can includean image or a thumbnail of the selected secondary media item 129B.

FIG. 2 is an example graphical user interface 201 (GUI) displaying agraphical representation of a media item in a format for playing themedia item on a user device 200, in accordance with an implementation ofthe disclosure. The format for playing the secondary media item 205 onthe user device 200 can include an image 203 (e.g., thumbnail) of asecondary media item 205. The secondary media item 205 can be anadvertisement, recommended video, or recommended audio. For example, thesecondary media item 205 may be an advertisement for a new video game.The GUI 201 can display a graphical representation (e.g., thumbnail) fora primary media item 207. The primary media item 207 and/or secondarymedia item 205 can be a video.

Referring to FIG. 1, if the user device 140 still has the capability tocontrol the playback of the selected secondary media item 129B on analternative playback device, the custom playback component 145 canselect the second format. The second format of the selected secondarymedia item 129B for playing the selected secondary media item 129B onthe alternative playback device 101 can include an image from a frame ofthe selected secondary media item 129B, an indicator that notifies auser that the selected secondary media item 129B can be played on thealternative playback device 101, a URI for the selected secondary mediaitem 129B, and a tracking identifier. For example, if the selectedsecondary media item 129B is a video, the second format of the selectedsecondary media item 129B can be a thumbnail of the selected secondarymedia item 129B and the indicator can be a message string, such as“Click here to play on your alternative playback device,” on thethumbnail. In one implementation, the indicator (e.g., message string)in the second format can be customized for the particular alternativeplayback devices 101A,B, as described in greater detail below inconjunction with FIG. 4.

FIG. 3 is an example graphical user interface 301 (GUI) displaying agraphical representation of a media item on a user device 300 forplaying the media item on an alternative playback device, in accordancewith an implementation of the disclosure. The GUI 301 can display agraphical representation (e.g., thumbnail) for a primary media item 307.The GUI 301 can display a graphical representation (e.g., thumbnail) fora secondary media item 305 in a format for playing the secondary mediaitem 305 on an alternative playback device. The secondary media item 305can be an advertisement, recommended video, or recommended audio. Forexample, the secondary media item 305 may be an advertisement for a newvideo game. The primary media item 307 and/or secondary media item 305can be a video. The format for playing the secondary media item 305 onan alternative playback device can include an image 303 (e.g.,thumbnail) from a frame of the secondary media item 305 and an indicator309 that the secondary media item 305 can be played on the alternativeplayback device. The indicator 309 can be a string.

Referring to FIG. 1, the tracking identifier can be used to link thesession of presenting the selected secondary media item 129B on the userdevice 140 with the session of playing the selected secondary media item129B on an alternative playback device, as described in greater detailbelow in conjunction with FIG. 5.

In general, functions described in one implementation as being performedby the content sharing platform can also be performed on the user device140 in other implementations, if appropriate. In addition, thefunctionality attributed to a particular component can be performed bydifferent or multiple components operating together. The content sharingplatform and media server 120 can also be accessed as a service providedto other systems or devices through appropriate application programminginterfaces, and thus is not limited to use in websites. Althoughimplementations of the disclosure are discussed in terms of a mediaserver and a content sharing platform, implementations may also begenerally applied to any type of social network providing digitalcontent and connections between users.

In implementations of the disclosure, a “user” may be represented as asingle individual. However, other implementations of the disclosureencompass a “user” being an entity controlled by a set of users and/oran automated source. For example, a set of individual users federated asa community in a social network may be considered a “user.”

In situations in which the systems discussed here collect personalinformation about users, or may make use of personal information, theusers may be provided with an opportunity to control whether the contentsharing platform collects user information (e.g., information about auser's social network, social actions or activities, profession, auser's preferences, or a user's current location), or to control whetherand/or how to receive content from the content server that may be morerelevant to the user. In addition, certain data may be treated in one ormore ways before it is stored or used, so that personally identifiableinformation is removed. For example, a user's identity may be treated sothat no personally identifiable information can be determined for theuser, or a user's geographic location may be generalized where locationinformation is obtained (such as to a city, ZIP code, or state level),so that a particular location of a user cannot be determined. Thus, theuser may have control over how information is collected about the userand used by the content sharing platform.

Data stores 123,143, 163 can be a memory (e.g., random access memory), adrive (e.g., a hard drive, a flash drive), a database system, or anothertype of component or device capable of storing data. Data stores 123,143, 163 can include multiple storage components (e.g., multiple drivesor multiple databases) that may span multiple computing devices (e.g.,multiple server computers).

FIG. 4 depicts a flow diagram of a method 400 for providing a custommedia item depending on whether a user device is paired with analternative playback device, in accordance with one implementation ofthe present disclosure. The method 400 is performed by processing logicthat may comprise hardware (circuitry, dedicated logic, etc.), software(such as is run on a general purpose computer system or a dedicatedmachine), or a combination of both. In one implementation, the method isperformed by a custom playback component 145 in a user device 140 ofFIG. 1, while in some other implementations one or more blocks of FIG. 4may be performed by another machine. In one implementation, a processingdevice of a user device (e.g., user device 140 in FIG. 1) performsmethod 400.

At block 410, the processing device receives a first media item from aserver. The first media item is associated with a second media item. Thefirst media item can be, for example, web page content or mobile appcontent. The second media item can be, for example, video and/or audio,one or more images, etc. The second media item can be an advertisement(e.g., display advertisement, video and/or audio advertisement), arecommended video, a recommended audio, or a recommendation audio/videofile. The server can be a secondary content provider server (e.g.,secondary content provider server 120 in FIG. 1). The secondary contentprovider server can be, for example, an advertisement server or arecommendation server. In one example, the first media item may be avideo identified by a user of user device and the second media item maybe an advertisement selected by the server to be presented before,during, or after presenting the first media item on a user device.

At block 420, the processing device determines that a playback state forthe user device indicates that the user device is paired with analternative playback device. The alternative playback device can be adevice that supports casting technology and/or mirroring technology. Theprocessing device can determine whether there is a playback state forthe user device that is already stored locally on the user device, andthe processing device can access the locally stored playback state. Forexample, the playback state can be stored as part of application data ina cache of the user device or in a cookie within a browser. The playbackstate can be represented by a Boolean value. The Boolean value can be abinary variable, having two possible values representing “true” and“false.”

The locally stored playback state can represent the playback state ofthe user device when a previous, most recent, web page was loaded by thebrowser, or when previous, most recent, mobile application data wasloaded by a mobile application. The processing device can examine, forexample, cookie data indicating the playback state to determine whetheror not the user device, on the previous loading of the web page orapplication data, was paired with an alternative playback device.

If a playback state for the user device is not yet stored locally on theuser device, the processing device can detect whether the user devicehas alternative playback pairing capability. The processing device candetermine the user device capability by checking whether the user deviceincludes any API for any alternative playback device, determiningwhether the user device operating system has granted the properpermissions for an application (e.g., web browser, mobile app) forinitiating/controlling playback of the second media item on thealternative playback device, and whether there is a connection betweenthe user device and the alternative playback device. If the user devicedoes not include an alternative playback API, the processing device candetermine that the user device is not capable of being paired with thealternative playback device.

If the user device does include an alternative playback API, theprocessing device can determine whether the user device operating system(OS) permits an application to initiate/control playback of the secondmedia item on the alternative playback device. If the application doesnot have the permission(s) from the OS, the processing device candetermine that the user device is not capable of being paired with thealternative playback device.

If the application does have the permission(s) from the OS, theprocessing device can determine whether the user device has a connectionwith the alternative playback device. The processing device can requestthe API (e.g., API 147 in FIG. 1) to determine whether an alternativeplayback device is in proximity of the user device and has establishedconnectivity (e.g., Wi-Fi Direct®, Bluetooth®, Whisper®) with the userdevice. The processing device can receive a response from the API thatindicates whether an alternative playback device is coupled to the userdevice.

If the user device does not have a connection with the alternativeplayback device, the processing device can determine that the userdevice is not capable of being paired with the alternative playbackdevice. If the user device does have a connection with the alternativeplayback device, the processing device can determine that the userdevice is capable of being paired with the alternative playback device.The processing device can store a playback state, for example, as acookie or as application data (e.g., mobile app data) in a cache.

In one implementation, the processing device determines the type ofoutput devices (e.g., output devices 103A,B in FIG. 1) and/or featuresof the output devices that are coupled to the alternative playbackdevices, and the processing device includes the playback state andoutput device data (e.g., types, features) for the connected outputdevices in the request to the server. Example types of output devicescan include televisions, audio systems, VR headsets, and computingdevices (e.g., desktops, laptops, tablets, etc.). Example features caninclude high-definition (HD) display, surround sound, display size,three-dimensional (3D) display, 3D VR, etc.

At block 430, the processing device sends a request to the server forthe second media item (e.g., advertisement, recommended video and/oraudio). The processing device can send the request upon determining theplayback state for the user device. The request can include the playbackstate for the user device. In one implementation, the playback state isincluded as cookie data in the request. In one implementation, therequest includes output device data that describes the types and/orfeatures of the output devices (e.g., television, sounds system, VRdevice, HD display, surround sound, 3D display) of the alternativeplayback device.

At block 440, the processing device receives, from the server, thesecond media item in a first format for playing the second media item onthe user device, and receives the second media item in a second formatfor playing the second media item on the alternative playback device.The processing device can receive a data package from the server thatincludes components (e.g., images, strings, URIs, tracking identifiers,etc.) of the second media item in the two formats.

At block 450, the processing device determines whether the playbackstate of the user device no longer indicates that the user device ispaired with the alternative playback device. The processing device canmake the determination in response to receiving the second media item inthe first format and the second format. The playback state of the userdevice may change since the time of when the user device sent therequest to the server. For example, the user device may lose networkconnectivity with the alternative playback device.

In one implementation, the processing device requests a local browser,mobile app, or alternative playback device API to make a newdetermination of whether the playback state of the user device no longerindicates that the user device is paired with the alternative playbackdevice. For example, when the processing device renders the receivedsecond media item in a web page in the browser or in a page of a mobileapp, the processing device can request the browser, mobile app, or APIto refresh the playback state of the user device. The processing devicecan listen for an update to the playback state for the user device, andcan store the updated playback state in a cache. The processing devicecan receive a new playback state from an application (e.g., web browser,mobile app) or an API. The processing device can replace the playbackstate in a data store with the new playback state.

When the processing device determines whether the playback state of theuser device still indicates that the user device is paired with thealternative playback device, the processing device can also collectmetadata pertaining to the alternative playback device. The metadata ofthe alternative playback device can include an identifier (e.g., name,label) of the alternative playback device.

Each alternative playback device can be assigned a playback deviceidentifier. The playback device identifier can be configurable and/oruser-defined. For example, the user device can be in the home of theSmith family and can be coupled to an alternative playback device thatis in a living room, and a user (e.g., Smith family member) may assign aname “Smith Living Room Device” to the alternative playback device.

In one implementation, the processing device receives the identifier ofeach alternative playback device that is coupled to the user device froman application (e.g., web browser, mobile app) or one or morealternative playback APIs. The processing device may use the identifierof the alternative playback device(s) in a graphical representation ofthe second media item or in a menu, as described in greater detailbelow.

The processing device can decide which format to use for rendering agraphical representation of the second media item on the user devicebased on the updated playback state. If the updated playback state ofthe user device no longer indicates that the user device is paired withthe alternative playback device (block 450), the processing devicedisplays a first graphical representation of the second media item inthe first format on the user device at block 470. The first graphicalrepresentation can include an image and may not include any components(e.g., images, strings, URIs, tracking identifiers, etc.), which may beincluded in the second format. Selection of the first graphicalrepresentation can trigger the playing of the second media item on theuser device. If the first graphical representation is selected (e.g.,clicked), the second media item can play in a media player in a new tabin the browser, in a media player in a new window of the browser, or ina media player in a mobile app on the user device.

If the updated playback state of the user device still indicates thatthe user device is paired with the alternative playback device (block450), the processing device displays a second graphical representationof the second media item in the second format on the user device atblock 460. In one implementation, the second format for the second mediaitem includes the identifier of the alternative playback device that isselected for the playback. For example, the second format of the secondmedia item can be a thumbnail of the second media item and an indicator(e.g., message string), such as “Click here to play on the Smith LivingRoom Device,” which can be displayed on the thumbnail.

The user device can be coupled to multiple alternative playback devices.For example, the user device can also be coupled to a second alternativeplayback device that is in a bedroom room in Smith family home and hasan identifier “Smith Bedroom Device.” In one implementation, if the userdevice is connected to multiple alternative playback devices, the secondformat includes an interstitial user interface (UI) menu (e.g., a pop-upmenu) that is to be rendered when a user selects the second graphicalrepresentation of the second media item. The UI menu can display theidentifiers of the alternative playback devices, and a user can selectone of the alternative playback devices for playing the second mediaitem.

The second graphical representation can include a thumbnail of thesecond media item, which when selected, can trigger the playing of thesecond media item on the alternative playback device. When the secondgraphical representation is selected, the processing device sends theURI of the second media item, which is part of the data package receivedfrom the server, to the alternate playback device.

In one implementation, when the processing device determines whether theplayback state of the user device still indicates that the user deviceis paired with the alternative playback device at block 450, theprocessing device can also collect metadata pertaining to the outputdevices (e.g., output devices 103A,B in FIG. 1). The metadata of theoutput devices can include the types of the output devices and/orfeatures of the of the output devices. Example types of output devicescan include televisions, audio systems, VR headsets, and computingdevices (e.g., desktops, laptops, tablets, etc.). Example features caninclude high-definition (HD) display, surround sound, display size, 3Ddisplay, 3D VR, etc.

The processing device can create and/or display an interstitial UI menu(e.g. pop-up menu) that displays the identifiers of the alternativeplayback devices, and data for the one or more output devices, and auser can select one of the alternative playback devices and one or moreoutput devices for playing the second media item. For example, thepop-up menu may display information that the “Smith Bedroom Device” isconnected to a 3D television and that the “Smith Living Room Device” isconnected to a VR headset. The data package can include multiple URIsfor multiple versions of the second media item that are designated forplayback on the alternative playback device. The processing device canselect a URI for one of the versions based on the type of output deviceand/or features of the output device that is to be used for playing theselected secondary media item. For example, the data package can includea first URI for a version of the second media item that supportsplayback to 3D television, and a second URI for a version of the secondmedia item that supports playback to a VR headset.

The processing device may receive input of the user selection, forexample, of the “Smith Living Room Device” is connected to a VR headset,and the processing device can select and send the second URI for theversion that is compatible with a VR headset to the alternative playbackdevice. The alternative playback device can use the URI to stream theversion of the selected second media item on one or more output devices(e.g., VR headset).

In one implementation, data package includes multiple URIs for multipleversions of the selected second media item that are designated forplayback on the alternative playback device. The processing device canselect a URI for one of the versions based on the type of output deviceand/or features of the output device that is to be used for playing theselected secondary media item. For example, the processing device maydetermine that the selected second media item is to be played on a VRheadset, and the processing device can select and send the URI for theversion that is compatible with a VR headset to the alternative playbackdevice. The alternative playback device can use the URI to stream theversion of the selected second media item on one or more output devices(e.g., VR headset).

The second format can also include a tracking identifier, and theprocessing device can send the tracking identifier to the alternativeplayback device. The alternative playback device can use the URI tocontact the server to stream the second media item from the server anddisplay the second media item on an output device (e.g., television).For example, the alternative playback device may play the second mediaitem on a big screen television. The alternative playback device can logthe time the second media item is played by the alternative playbackdevice on the display with the tracking identifier to associate the timewith the second graphical representation that was displayed on the userdevice. The tracking identifier can be associated with a sessionidentifier for the session when the user device sent the request to theserver, as described in greater detail below in conjunction with FIG. 5.

FIG. 5 depicts a flow diagram of a method 500 for selecting a media itembased on whether a user device is paired with an alternative playbackdevice, in accordance with one implementation of the present disclosure.The method 500 is performed by processing logic that may comprisehardware (circuitry, dedicated logic, etc.), software (such as is run ona general purpose computer system or a dedicated machine), or acombination of both. In one implementation, the method is performed byan alternative media playback provider 125 in a server 120 of FIG. 1,while in some other implementations one or more blocks of FIG. 5 may beperformed by another machine. In one implementation, a processing deviceof a server computing machine (e.g., secondary content provider server120 in FIG. 1) performs method 500.

At block 510, the processing device receives a request from a userdevice for an additional media item pertaining to a first media item tobe displayed to a user. The first media item can be, for example, webpage content or mobile app content to be displayed on the user device.The additional media item can be an advertisement, a recommended video,or recommended music. The advertisement can be a video or a presentationof a set of images. The video and set of images can include audio.

The request can include a playback state for the user device indicatingwhether the user device is paired with an alternative playback device.In one implementation, the request includes a tag for a placeholder(e.g., placeholder 146 in FIG. 1) that indicates the type of additionalmedia item that is being requested, as described in greater detailbelow. In one implementation, the request includes output device data(e.g., types, features) for the output devices that are associated withthe alternative playback device(s) that are connected to the userdevice, as described in greater detail below.

At block 520, the processing device determines, from the playback statefor the user device in the request that the additional media item isplayable on an alternative playback device. The playback state can be,for example, a state bit or a cookie in the request. Upon receiving therequest, the processing device can search for and extract the state bitor cookie in the request to determine whether the user device is pairedwith an alternative playback device, which indicates whether theadditional media item is playable on the alternative playback device.The playback state can be represented by a Boolean value. The Booleanvalue can be a binary variable, having two possible values representing“true” (e.g., “1”) and “false” (e.g., “0”). For example, a “true” valuecan indicate that the user device is paired with the alternativeplayback device, which indicates that the additional media item isplayable on an alternative playback device and a “false” value canindicate that the additional media item is not playable on analternative playback device.

At block 530, the processing device identifies a set of candidate mediaitems pertaining to the first media item. The identification can be madein response to a determination that the additional media item isplayable on the alternative playback device. The processing device canbe coupled to a data store (e.g., data store 123 in FIG. 1) that storesmedia items. A subset of the media items can be designated for playbackon an alternative playback device. The subset of the media items can bespecifically formatted for playback on an alternative playback device.For example, the subset of the media items can each be marked with anindicator (e.g., indicator 122 in FIG. 1). The indicator can be a bit ora flag. The bit or a flag can have a Boolean value that is a binaryvariable, having two possible values representing “true” (e.g., “1”) and“false” (e.g., “0”). For example, a “true” value can indicate that therespective media item is specifically formatted for playback on analternative playback device and a “false” value can indicate that therespective media item is not specifically formatted for playback on analternative playback device.

If the playback state in the request indicates that the additional mediaitem is not playable on an alternative playback device, the processingdevice can exclude the subset of candidate media items that aredesignated for playback on an alternative playback device from the setof candidate media items. If the playback state indicates that theadditional media item is playable on an alternative playback device, theprocessing device can include the subset of candidate media items thatare designated for playback on an alternative playback device in the setof candidate media items.

At block 540, the processing device selects a candidate media item witha highest ranking from the subset of candidate media items as theadditional media item. The processing device can identify rankings forthe set of candidate media items. The rankings can be based on qualityscores of candidate media items.

The processing device can identify a quality score of each candidatemedia item. The quality score is a metric that represents how relevantthe respective candidate media item is to a document (e.g., a web pageor a mobile application UI document 142 in FIG. 1) and/or to a user thatis requesting the document. The components of a quality score caninclude, for example, CTR (click-through rate), relevance, and landingpage. In one example, the CTR for a candidate media item is the ratio ofusers who click on a specific link to the number of total users who viewthe candidate media item. In another example, the CTR for a candidatemedia item that is a video is counted when the video starts playing. Alanding page is a standalone web page or mobile app page that isdistinct from the main website or the main mobile app and has beendesigned for a single focused objective to persuade a user to clickthrough to another page.

A ranking for a candidate media item can be an overall score for therespective candidate media item. The ranking (e.g., overall score) canbe a function of a quality score and a bid. In one implementation, theranking for a candidate media item is the quality score of the candidatemedia item multiplied by the bid of the candidate media item. Eachcandidate media item can be assigned a bid, which is the highest amountor currency that a content provider is willing to pay when a userselects (e.g., clicks) a graphical representation of the candidate mediaitem. A bid can be user (e.g., content provider, advertiser) defined.The quality score can be generated by the server (e.g., secondarycontent provider server 120 in FIG. 1), such as an advertisement serveror a recommendation server.

The processing device can improve rankings of the subset of candidatemedia items that are designated for playback on an alternative playbackdevice by modifying (e.g., increasing) the quality scores of the subsetof the candidate media items that are designated for playback on analternative playback device. In one implementation, each quality scoreis increased by a multiplier or by adding a value to the respectivequality score. The multiplier and value can be configurable and user(e.g., system administrator) defined. The increased quality scores canproduce higher rankings (e.g., overall scores) for each of the subset ofthe media items that are marked for playback on an alternative playbackdevice.

The processing device selects a candidate media item with a highestranking (e.g., overall score) from the subset of candidate media itemsas the additional media item. At block 550, the processing device sendsa data package to the user device for presenting the selected candidatemedia item as the additional media item to the user. If the playbackstate in the request indicates that the additional media item can beplayed on an alternative playback device, the processing device cancreate the selected candidate media item in multiple formats. The datapackage can include the selected candidate media item in a first formatfor playing the additional media item on the user device and theselected candidate media item in a second format for playing theadditional media item on the alternative playback device.

In one implementation, there is a tag in the request received at block510. The tag can indicate the type of additional media item that isbeing requested. Example types of media items can include text, image,rich media, or video. The video type can include video, an animated setof images, a music file, or any type of media that can be played in avideo player, music player, or alternative playback device.

In one implementation, there is a user device identifier in the requestreceived at block 510 that specifies the type (e.g., smartphone, tablet,e-reader, laptop, desktop) of user device. The processing device can usethe tag and/or user device identifier to select a first set ofcomponents for the first format for playing the additional media item onthe user device. For example, if the tag specifies video as the type andthe user device identifier specifies a smartphone, the first set ofcomponents can include a media file (e.g., video file, music file,presentation file, etc.) of a particular version of the selectedcandidate media item that is formatted for a smartphone.

A data store (e.g., data store 123 in FIG. 1) can store multipleversions of a media item. For example, the data store can store aversion of the media item that is formatted for playback on a mobiledevice (e.g., smartphone). The first format for a particular user device(e.g., mobile device) can include particular video quality, soundquality, display size, length of the video, and content of the video.For example, the data store can store a video file for a media item thatis formatted for a small display on a smartphone, may have lower videoquality (e.g., 240 p and 360 p), may be in stereo sound, and may beshort in length (e.g., less than 10 seconds). The first format forplaying an additional media item on a user device can be configurableand user (e.g., content owner, advertiser) defined.

The second format for playing the additional media item on thealternative playback device can include components that are differentfrom the first format. In one implementation, the request received atblock 510 also includes output device data (e.g., types, features) forthe output devices that are associated with the alternative playbackdevice(s) that are connected to the user device. Example types of outputdevices can include televisions, audio systems, VR headsets, andcomputing devices (e.g., desktops, laptops, tablets, etc.). Examplefeatures can include high-definition (HD) display, surround sound,display size, three-dimensional (3D) display, 3D VR, etc.

The processing device can use the tag and/or output device data toselect a second set of components for the second format for playing theadditional media item on the alternative playback device. The second setof components can include a thumbnail image, one or more strings, one ormore URIs for the selected candidate media item, and a trackingidentifier. For example, if the tag specifies video as the type and theoutput device data specifies a 3D television, the second set ofcomponents can include a URI of a media file (e.g., video file, musicfile, presentation file, etc.) of a particular version of the selectedcandidate media item that is formatted for 3D display. The output devicedata can specify multiple output devices and the second set ofcomponents can include multiple URIs for multiple versions of theselected candidate media item. For example, the output device data mayspecifies a 3D television and a VR headset, the second set of componentscan include a first URI of a media file that is formatted for 3D displayand a second URI of a media file that is formatted for a VR headset.

The second format for playback on an alternative playback device caninclude particular video quality, sound quality, display size, length ofthe media item, and content of the media item. For example, contentproviders (e.g., content owners, advertisers) can provide a video filefor a media item that is formatted for a large (as defined by thecontent provider) display, a HD display, a panoramic display, and/or a3D display. For example, the video file may have high video quality(e.g., 720p and 1080p). In another example, the video file may be insurround sound, may be longer (e.g., 30 seconds) in length, and maycontain content (e.g., action movie trailer) that is designated forplayback on an alternative playback device. The second format forplaying an additional media item on an alternative playback device canbe configurable and user (e.g., content owner, advertiser) defined.

If the playback state in the request indicates that the additional mediaitem can be played on an alternative playback device, the processingdevice can create a tracking identifier for the additional media item.The tracking identifier can be derived from a session identifier of thesession that is associated with the request. The processing device canadd the tracking identifier to one or more URIs of the selectedcandidate media item, and can include the one or more URIs with thetracking identifier in the data package.

When the alternative playback device plays the additional media item,the alternative playback device can log the consumption (e.g., play)time with the tracking identifier. The tracking identifier can associatethe consumption (e.g., play) time of playing the additional media itemon the alternative playback device to the graphical representation ofthe additional media item on the user device.

FIG. 6 depicts a block diagram of a computer system operating inaccordance with one or more aspects of the present disclosure. Incertain implementations, computer system 600 may be connected (e.g., viaa network, such as a Local Area Network (LAN), an intranet, an extranet,or the Internet) to other computer systems. Computer system 600 mayoperate in the capacity of a user device. Computer system 600 mayoperate in the capacity of a server or a client computer in aclient-server environment. Computer system 600 may be provided by apersonal computer (PC), a tablet PC, a set-top box (STB), a PersonalDigital Assistant (PDA), a cellular telephone, a web appliance, aserver, a network router, switch or bridge, or any device capable ofexecuting a set of instructions (sequential or otherwise) that specifyactions to be taken by that device. Further, the term “computer” shallinclude any collection of computers that individually or jointly executea set (or multiple sets) of instructions to perform any one or more ofthe methods described herein.

In a further aspect, the computer system 600 may include a processingdevice 602, a volatile memory 604 (e.g., random access memory (RAM)), anon-volatile memory 606 (e.g., read-only memory (ROM) orelectrically-erasable programmable ROM (EEPROM)), and a data storagedevice 618, which may communicate with each other via a bus 608.

Processing device 602 may be provided by one or more processors such asa general purpose processor (such as, for example, a complex instructionset computing (CISC) microprocessor, a reduced instruction set computing(RISC) microprocessor, a very long instruction word (VLIW)microprocessor, a microprocessor implementing other types of instructionsets, or a microprocessor implementing a combination of types ofinstruction sets) or a specialized processor (such as, for example, anapplication specific integrated circuit (ASIC), a field programmablegate array (FPGA), a digital signal processor (DSP), or a networkprocessor).

Computer system 600 may further include a network interface device 622.Computer system 600 also may include a video display unit 610 (e.g., anLCD), an input device 612 (e.g., a keyboard, an alphanumeric keyboard, amotion sensing input device, touch screen), a cursor control device 614(e.g., a mouse), and a signal generation device 616.

Data storage device 618 may include a non-transitory machine-readablestorage medium 624 on which may store instructions 626 encoding any oneor more of the methods or functions described herein, includinginstructions encoding components of server 120,160 of FIG. 1 forimplementing method 500, and/or components of user device 140 of FIG. 1for implementing method 400.

Instructions 626 may also reside, completely or partially, withinvolatile memory 604 and/or within processing device 602 during executionthereof by computer system 600, hence, volatile memory 604 andprocessing device 602 may also constitute machine-readable storagemedia.

While machine-readable storage medium 624 is shown in the illustrativeexamples as a single medium, the term “computer-readable storage medium”shall include a single medium or multiple media (e.g., a centralized ordistributed database, and/or associated caches and servers) that storethe one or more sets of executable instructions. The term“computer-readable storage medium” shall also include any tangiblemedium that is capable of storing or encoding a set of instructions forexecution by a computer that cause the computer to perform any one ormore of the methods described herein. The term “computer-readablestorage medium” shall include, but not be limited to, solid-statememories, optical media, and magnetic media.

The methods, components, and features described herein may beimplemented by discrete hardware components or may be integrated in thefunctionality of other hardware components such as ASICS, FPGAs, DSPs orsimilar devices. In addition, the methods, components, and features maybe implemented by firmware modules or functional circuitry withinhardware devices. Further, the methods, components, and features may beimplemented in any combination of hardware devices and computer programcomponents, or in computer programs.

Unless specifically stated otherwise, terms such as “receiving,”“determining,” “sending,” “displaying,” “identifying,” “selecting,”“excluding,” “creating,” “adding,” or the like, refer to actions andprocesses performed or implemented by computer systems that manipulatesand transforms data represented as physical (electronic) quantitieswithin the computer system registers and memories into other datasimilarly represented as physical quantities within the computer systemmemories or registers or other such information storage, transmission ordisplay devices. Also, the terms “first,” “second,” “third,” “fourth,”etc. as used herein are meant as labels to distinguish among differentelements and may not have an ordinal meaning according to theirnumerical designation.

Examples described herein also relate to an apparatus for performing themethods described herein. This apparatus may be specially constructedfor performing the methods described herein, or it may comprise ageneral purpose computer system selectively programmed by a computerprogram stored in the computer system. Such a computer program may bestored in a computer-readable tangible storage medium.

The methods and illustrative examples described herein are notinherently related to any particular computer or other apparatus.Various general purpose systems may be used in accordance with theteachings described herein, or it may prove convenient to construct morespecialized apparatus to perform methods 400 and 500 and/or each of itsindividual functions, routines, subroutines, or operations. Examples ofthe structure for a variety of these systems are set forth in thedescription above.

The above description is intended to be illustrative, and notrestrictive. Although the present disclosure has been described withreferences to specific illustrative examples and implementations, itwill be recognized that the present disclosure is not limited to theexamples and implementations described. The scope of the disclosureshould be determined with reference to the following claims, along withthe full scope of equivalents to which the claims are entitled.

What is claimed is:
 1. A method comprising: receiving a first media itemfrom a server, the first media item being associated with a second mediaitem; determining, by a processor of a user device, that a playbackstate for the user device indicates that the user device is paired withan alternative playback device; sending a request to the server for thesecond media item, the request comprising the playback state for theuser device; receiving, from the server, the second media item in afirst format for playing the second media item on the user device andreceiving the second media item in a second format for playing thesecond media item on the alternative playback device; determiningwhether the playback state of the user device no longer indicates thatthe user device is paired with the alternative playback device;responsive to determining that the playback state of the user device nolonger indicates that the user device is paired with the alternativeplayback device, displaying a first graphical representation of thesecond media item in the first format on the user device, wherein userselection of the first graphical representation triggers playback of thesecond media item on the user device, and responsive to determining thatthe playback state of the user device indicates that the user device ispaired with the alternative playback device, displaying a secondgraphical representation of the second media item in the second formaton the user device, wherein user selection of the second graphicalrepresentation triggers playback of the second media item on thealternative playback device.
 2. The method of claim 1, wherein theplayback state is stored locally on the user device.
 3. The method ofclaim 1, wherein the alternative playback device supports at least oneof casting technology or mirroring technology.
 4. The method of claim 1,further comprising: displaying the second graphical representation ofthe second media item in the second format on the user device; receivinguser selection of the second graphical representation; sending auniversal resource identifier of the second media item and a trackingidentifier associated with a session identifier of the request to thealternative playback device.
 5. The method of claim 1, wherein thesecond graphical representation of the second media item in the secondformat comprises a thumbnail, a string placeholder for an identifier ofthe alternative playback device, and a universal resource identifier forplaying the selected candidate media item on the alternative playbackdevice.
 6. The method of claim 1, wherein displaying the secondgraphical representation of the second media item in the second formaton the user device comprises: determining an identifier of thealternative playback device; and displaying the identifier of thealternative playback device in the second graphical representation ofthe second media item.
 7. The method of claim 1, wherein the secondmedia item is at least one of recommended video, recommended audio, oran advertisement.
 8. A method comprising: receiving, by a processor of amedia server, a request from a user device for an additional media itempertaining to a first media item to be displayed to a user; determining,from a playback state for the user device in the request, whether theadditional media item is playable on an alternative playback device;responsive to a determination that the additional media item is playableon the alternative playback device, identifying a set of candidate mediaitems pertaining to the first media item, the set of candidate mediaitems comprising a subset of candidate media items that are designatedfor playback on the alternative playback device; selecting a candidatemedia item with a highest ranking from the subset of candidate mediaitems as the additional media item; and sending, to the user device, adata package comprising the selected candidate media item forpresentation as the additional media item.
 9. The method of claim 8,further comprising: determining that the playback state indicates thatthe additional media item is not playable on the alternative playbackdevice; and excluding the subset of candidate media items that aredesignated for playback on the alternative playback device from the setof candidate media items.
 10. The method of claim 8, wherein the datapackage comprises a first format for playing the selected candidatemedia item on the user device, and a second format for playing theselected candidate media item on the alternative playback device. 11.The method of claim 8, further comprising: determining that the playbackstate indicates that the additional media item is playable on thealternative playback device; creating a tracking identifier based on asession identifier that is associated with the request; adding thetracking identifier to a universal resource identifier for playing theselected candidate media item on the alternative playback device; andcreating the data package comprising the universal resource identifierwith the tracking identifier.
 12. The method of claim 8, furthercomprising: receiving output device data describing one or more featuresof one or more output devices connected to the alternative playbackdevice; and selecting one or more universal resource identifiers basedon the one or more features of one or more output devices connected tothe alternative playback device.
 13. A non-transitory computer readablemedium having instructions stored thereon that, when executed by aprocessing device, cause the processing device to perform operationscomprising: receiving a first media item from a server, the first mediaitem being associated with a second media item; determining, by theprocessor of a user device, that a playback state for the user deviceindicates that the user device is paired with an alternative playbackdevice; sending a request to the server for the second media item, therequest comprising the playback state for the user device; receiving,from the server, the second media item in a first format for playing thesecond media item on the user device and receiving the second media itemin a second format for playing the second media item on the alternativeplayback device; determining whether the playback state of the userdevice no longer indicates that the user device is paired with thealternative playback device; and responsive to determining that theplayback state of the user device no longer indicates that the userdevice is paired with the alternative playback device, displaying afirst graphical representation of the second media item in the firstformat on the user device, wherein user selection of the first graphicalrepresentation triggers playback of the second media item on the userdevice, and responsive to determining that the playback state of theuser device indicates that the user device is paired with thealternative playback device, displaying a second graphicalrepresentation of the second media item in the second format on the userdevice, wherein user selection of the second graphical representationtriggers playing the second media item on the alternative playbackdevice.
 14. The non-transitory computer readable medium of claim 13,wherein the playback state is stored locally on the user device.
 15. Thenon-transitory computer readable medium of claim 13, wherein thealternative playback device supports at least one of casting technologyor mirroring technology.
 16. The non-transitory computer readable mediumof claim 13, the operations further comprising: displaying the secondgraphical representation of the second media item in the second formaton the user device; receiving user selection of the second graphicalrepresentation; sending a universal resource identifier of the secondmedia item and a tracking identifier associated with a sessionidentifier of the request to the alternative playback device.
 17. Thenon-transitory computer readable medium of claim 13, wherein the secondgraphical representation of the second media item in the second formatcomprises a thumbnail, a string placeholder for an identifier of thealternative playback device, and a universal resource identifier forplaying the selected candidate media item on the alternative playbackdevice.
 18. The non-transitory computer readable medium of claim 13,wherein displaying the second graphical representation of the secondmedia item in the second format on the user device comprises:determining an identifier of the alternative playback device; anddisplaying the identifier of the alternative playback device in thesecond graphical representation of the second media item.
 19. Thenon-transitory computer readable medium of claim 13, wherein the secondmedia item is at least one of recommended video, recommended audio, oran advertisement.
 20. A system comprising: a memory; and a processingdevice, coupled to the memory, to: receive a first media item from aserver, the first media item being associated with a second media item;determine that a playback state for the user device indicates that theuser device is paired with an alternative playback device; send arequest to the server for the second media item, the request comprisingthe playback state for the user device; receive, from the server, thesecond media item in a first format for playing the second media item onthe user device and receiving the second media item in a second formatfor playing the second media item on the alternative playback device;determine whether the playback state of the user device no longerindicates that the user device is paired with the alternative playbackdevice; responsive to determining that the playback state of the userdevice no longer indicates that the user device is paired with thealternative playback device, display a first graphical representation ofthe second media item in the first format on the user device, whereinuser selection of the first graphical representation triggers playbackof the second media item on the user device, and responsive todetermining that the playback state of the user device indicates thatthe user device is paired with the alternative playback device, displaya second graphical representation of the second media item in the secondformat on the user device, wherein user selection of the secondgraphical representation triggers playback of the second media item onthe alternative playback device.